﻿using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Configuration;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using EntityModule;


namespace Sport
{
    public partial class Login : System.Web.UI.Page
    {
        protected void btnLogin_Click(object sender, EventArgs e)
        {
            User user = (new NewsService()).GetUser(txtUserName.Text, txtPass.Text);
            if (user == null)
            {
                lblError.Text = "Tên hoặc mật khẩu không hợp lệ";
                return;
            }
            Session[Constant.UserID] = user.ID;
            Response.Redirect("Sport.aspx");
            return;
        }
    }
}